<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>


<form th:action="@{/user/update}" method="post">
    <input type="hidden" name="id" th:value="${user.id}">
    姓名：<input type="text" name="name" th:value="${user.name}"/><br/>
    性别：<input type="radio" name="sex" value="2" th:attr="checked=${user.sex=='2'}?true:false"/>女
    <input type="radio" name="sex" value="1" th:attr="checked=${user.sex=='1'}?true:false"/>男<br/>
    年龄：<input type="text" name="age" th:value="${user.age}"/><br/>
    生日：<input type="date" name="birth" th:value="${#dates.format(user.birth,'yyyy-MM-dd')}"/><br/>
    <input type="submit" value="确定"/><br/>
</form>
</body>
</html>